package ex04;

abstract class Liti {
	public abstract double superficial();
	public abstract double volume();
}
class Ball extends Liti{
	private double r;
	private final double PI=3.14;
	public Ball(double r){
		this.r=r;
	}
	public double superficial() {
		return 4*PI*r*r;
	}

	public double volume() {
		return 4/3*(PI*r*r*r);
	} 
}
class Column extends Liti{
	private double r;
	private double h;
	private final double PI=3.14;
	public Column(double r,double h){
		this.r=r;
		this.h=h;
	}
	public double superficial() {
		return 2*PI*r*r+2*PI*r*h;
	}
	public double volume() {
		return PI*r*r*h;
	}
}
class Cone extends Liti{
	private double r;
	private double l;
	private double h;
	private final double PI=3.14;
	public Cone(double r,double l,double h){
		this.r=r;
		this.l=l;
		this.h=h;
	}
	public double superficial() {
		return PI*r*l+PI*r*r;
	}
	public double volume() {
		return (PI*r*r*h)/3;
	}
}

